<?php

namespace plugin\admin\app\model;

use plugin\admin\app\model\Base;

/**
 * @property integer $id (主键)
 * @property integer $user_id 用户ID
 * @property integer $card_id 银行卡ID
 * @property string $amount 提现金额
 * @property integer $status 状态，1审核中，2已通过，3已驳回
 * @property string $created_time 创建时间
 */
class UserWithdraw extends Base
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'wa_user_withdraws';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';
    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public $timestamps = false;

    const STATUS_WAITING_AUDIT = 1;

    const STATUS_AGREE = 2;

    const STATUS_REJECT = 3;

    public static function getStatusText($status)
    {
        switch ($status) {
            case self::STATUS_WAITING_AUDIT:
                return '审核中';
            case self::STATUS_AGREE:
                return '已通过';
            case self::STATUS_REJECT:
                return '已驳回';
        }
    }
    
}
